home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
U-Utilities
/
(c)u2.d64
/
gemini char.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
6KB
|
214 lines
10 REM ***CHARACTER CREATOR***
20 REM *** FOR GEMINI 10X ***
30 REM *** WITH CARD/? ***
40 REM *** INTERFACE ***
50 REM *** ***
60 REM *** ADAPTED BY ***
70 REM *** KEN COX ***
80 REM *** TPUG TORONTO ***
90 REM *** COPYRIGHT 1984 ***
100 REM *** OKAY TO GIVE BUT***
110 REM *** NOT TO SELL ***
120 REM
130 DIMK(126,10)
140 OPEN4,4,25:CMD4:PRINT" ":PRINT#4,:CLOSE4
150 POKE53281,0:POKE53280,12:PRINT""CHR$(142)CHR$(8):POKE253,0
160 PRINT"[147] DO YOU WANT INSTRUCTIONS? (Y/N)"
170 GETI$:IFI$=""THENGOTO170
180 IFI$="Y"THENGOSUB1630
190 PRINT"[147]";
200 PRINT"FONT NAME OR"
210 INPUT"D[146]IRECTORY D[157][157][157]";F$
220 IFF$="D"THENPRINT"":GOSUB1530:GOTO200
230 REM *READ FILE AND STORE* * DATA IN ARRAYS *
240 CLOSE1:OPEN 1,8,2,"0:"+F$+",S,R"
250 OPEN15,8,15:INPUT#15,E,E$
260 IFE<>0THENPRINT"[147]";E$:CLOSE1:CLOSE15:GOTO200
270 FORCH=32TO126:FORD=0TO10:INPUT#1,K(CH,D) :NEXTD:NEXTCH
280 CLOSE1:CLOSE15
290 GOSUB1250
300 PRINT"[147]":IFCH>31ANDCH<127THENPRINT" THE LAST ASCII NUMBER WAS";CH
310 PRINT " ENTER THE ASCII NUMBER TO DESIGN"
320 PRINT" (32 TO 126)";
330 INPUTCH
340 IFCH<32ORCH>126GOTO300
350 REM
360 REM ***SET UP SCREEN DISPLAY***
370 REM
380 DE=0:PRINT"[147][158]S -STORE DATA IN MEMORY ASCII NO.";
390 PRINTCH;"[158]";:PRINTCHR$(CH)
400 PRINT"P -PRINT THIS CHARACTER"
410 PRINT"T -PRINT ALL CHARACTERS"
420 PRINT"F1-DESCENDER ON"
430 PRINT"F3-DESCENDER OFF"
440 PRINT"Q -QUIT/WRITE FONT TO DISK"
450 PRINT"N -NEW GRID (WILL NOT STORE DATA)"
460 PRINT"E -ERASE DOT"
470 PRINT"SPACE-DOT ON
480 [153]"CURSOR CONTROLS TO MOVE"
490 [153]" ";:[129]T[178]1[164]9:[153]"TO";:[130]:[153]
500 [129]T[178]1[164]7:[153]" THEN";:[129]R[178]1[164]9:[153]".";:[130]:[153]"FN":[130]
510 [153]" ";:[129]T[178]1[164]9:[153]"TAB(";:[130]:R[178]0:C[178]0:LS[178]46:TT[178]1
520 [153]"CMDCMDCMDCMDCMDCMDCMDONONONONONONON";:[141]930
530 [151]204,0:[161]A$:[139]A$[178]""[167]530
540 [151]204,1:[139]A$[178]"S"[167][141]810
550 [139]A$[178]"S"[167][141]840
560 [139]A$[178]"INPUT"[167] [151]55911,1:[151]55923,1
570 [139]A$[178]"INPUT"[167]DE[178]1:[151]1640,122:[151]1639,111:[151]1650,76:[151]1651,111
580 [139]A$[178]"DIM"[167]DE[178]0:[151]1640,103:[151]1650,101:
590 [139]A$[178]"DIM"[167][151]55911,0:[151]55923,0
600 [139]A$[178]"E"[167]780
610 [139]A$[178]"N"[167][137]300
620 [139]A$[178]"Q"[167][141]840:[137]1330
630 [139]A$[178]" "[167]790
640 [139]A$[178]"P"[167][141]840:[141]1020:[141]1170
650 [139]A$[178]"T"[167][141]840:[141]1020:[129]TE[178]32[164]126:[152]4,[199](TE);:[130]TE
660 [139]A$[178]"T"[167][152]4,[199](13):[160]4
670 [139] [194](206)[179][177]46[175]TT[178]1[167][153]" WAIT";
680 TT[178]0
690 [139]LS[178]46[167][153]".";:[137]710
700 [153]" WAIT";
710 C[178]C[171](A$[178]"")[170](A$[178]"CMD")
720 R[178]R[171](A$[178]"")[170](A$[178]"ON")
730 [139]C[179]0[176]C[177]8[167]C[178]0[172](C[177]8)[171]8[172](C[179]0)
740 [139]R[179]0[176]R[177]6[167]R[178]0[172](R[177]6)[171]6[172](R[179]0)
750 [153]"":[129]T[178]1[164]10[170]R:[153]"";:[130]:[129]T[178]1[164]17[170]C:[153]"";:[130]
760 LS[178][194](1481[170]R[172]40[170]C)
770 [137]530
780 [153]".";:C[178]C[170]1:[137]710:[143] ERASE ROUTINE
790 [153]" WAIT";:C[178]C[170]1:[137]710:[143] DOT ROUTINE
800 [143]
810 [143] *READ SCREEN DISPLAY AND*
820 [143] * AND STORE IN ARRAY *
830 [143]
840 K(CH,0)[178]CH:K(CH,10)[178]DE
850 SC[178]40
860 [129]D[178]1[164]9:CM[178]1480[170]D
870 K(CH,D)[178]0:[129]P[178]0[164]6
880 [139][194](CM)[178]160[176][194](CM)[178]32[167]K(CH,D)[178]K(CH,D)[170]2[174]P
890 CM[178]CM[170]SC:[130]P
900 [130]D
910 [142]
920 [143] *READ ARRAY AND SHOW CHARACTER*
930 SC[178]40
940 [129]D[178]1[164]9:CM[178]1480[170]D:[129]P[178]0[164]6
950 [139]K(CH,D)[175]2[174]P[167][151]CM,160
960 CM[178]CM[170]SC:[130]P:[130]D
970 [139]K(CH,10)[178]1[167]DE[178]1:[151]55911,1:[151]55923,1
980 [139]K(CH,10)[178]1[167][151]1640,122:[151]1639,111:[151]1650,76:[151]1651,111
990 [142]
1000 [143] *TELL PRINTER WHICH ASCII* * NUMBER IS BEING CHANGED*
1010 [143]
1020 [159]4,4
1030 [152]4,[199](27)[199](42)[199](1)[199](K(CH,0))[199](K(CH,10));
1040 [143]
1050 [143] *SEND NEW CHARACTER DATA*
1060 [143]
1070 [129]D[178]1[164]9:[152]4,[199](K(CH,D));:[130]D
1080 [143]
1090 [143] *SELECT DOWNLOADED SET*
1100 [143] * FOR TESTING *
1110 [143]
1120 [152]4,[199](27)[199](36)[199](1);
1130 [142]
1140 [143]
1150 [143] *PRINT NEW CHARACTER*
1160 [143]
1170 [129]P[178]1[164]10:[152]4,[199](K(CH,0));[199](32);:[130]P
1180 [143]*
1190 [143]*PRINT CHARACTER WITH UNDERLINE*
1200 [152]4,[199](27)[199](45)[199](1)
1210 [129]P[178]1[164]10:[152]4,[199](K(CH,0));[199](32);:[130]P:[152]4,[199](13)
1220 [152]4,[199](27)[199](45)[199](0):[160]4
1230 [142]
1240 [143] *DOWNLOAD SET FROM DISK*
1250 [160]4:[159]4,4:[153]"LOAD SENDING DATA TO PRINTER FOR 19 SECONDS"
1260 [129]CH[178]32[164]126:
1270 [152]4,[199](27)[170][199](42)[170][199](1)[170][199](CH)[170][199](K(CH,10));
1280 [129]D[178]1[164]9:[152]4,[199](K(CH,D));:[130]D:[130]CH
1290 [152]4,[199](27)[199](36)[199](1)
1300 [160]4: [142]
1310 [143] *WRITE DATA TO SEQUENTIAL FILE*
1320 [143]
1330 [153]"LOAD WANT TO SAVE FILE TO DISK?(Y/N)
1340 GETQ$:IFQ$=""THENGOTO1340
1350 IFQ$="N"THENPRINT"REMEMBER THAT YOUR INTERFACE HAS BEEN DISABLED.":END
1360 IFQ$<>"Y"THENGOTO1340
1370 INPUT" NAME OF FILE: TEST FONT[157][157][157][157][157][157][157][157][157][157][157]";N$
1380 CR$=CHR$(13)
1390 CLOSE1:OPEN 1,8,2,"@0:"+N$+",S,W"
1400 CLOSE15: OPEN15,8,15
1410 INPUT#15,E,E$,E1,E2
1420 PRINT"";E;E$:FORDL=0TO2000:NEXTDL
1430 IFE<>0THENGOTO1330
1440 FORCH=32TO126
1450 FOR D=0TO10
1460 PRINT#1,K(CH,D);CR$
1470 NEXTD
1480 NEXTCH
1490 PRINT#1,CHR$(13):CLOSE1
1500 CLOSE15:PRINT"REMEMBER THAT YOUR INTERFACE HAS BEEN DISABLED.":END
1510 REM * DIRECTORY SUBROUTINE *
1520 REM
1530 PRINT"[147]":DT=2:A$="0":A=0:B=0
1540 OPEN2,8,0,"$"+A$+"":GET#2,A$:GET#2,A$
1550 IFA=DTTHENA=0:PRINT
1560 PRINTTAB(20*A);
1570 FORC=1TO4:GET#2,A$:NEXT:IFST<>0THENCLOSE2:PRINTCHR$(13):RETURN
1580 GET#2,A$:IFA$=""THENA=A+1:GOTO1550
1590 IFA$=CHR$(34)THENB=NOTB:GOTO1580
1600 IFBTHENPRINTA$;
1610 GOTO1580
1620 REM * INSTRUCTION ROUTINE *
1630 PRINT"[147] THIS UTILITY IS USED TO DESIGN"
1640 PRINT" YOUR OWN CHARACTERS FOR THE GEMINI,"
1650 PRINT" TEST THEM AND THEN STORE THE DATA ON"
1660 PRINT" A DISK FILE. A 'NORMAL FONT'"
1670 PRINT" IS PROVIDED AS A STARTER FILE TO BE"
1680 PRINT" LOADED BY THE PROGRAM INTO THE PRINTER"
1690 PRINT" PRESS SPACE[146]"
1700 GETSP$:IFSP$=""THENGOTO1700
1710 IFSP$<>" "THENGOTO1700
1720 PRINT"[147] THE PRINTER WILL NOT PRINT DOTS WHICH"
1730 PRINT" ARE ADJACENT TO EACH OTHER ON A"
1740 PRINT" HORIZONTAL LINE. LEAVE A SPACE BETWEEN"
1750 PRINT" THEM. ALL VERTICAL DOTS WILL PRINT."
1760 PRINT" PRESS SPACE[146]"
1770 GETSP$:IFSP$=""THENGOTO1770
1780 PRINT"[147] IF A CHARACTER REQUIRES A DESCENDER,"
1790 PRINT" (A PORTION BELOW THE LINE), PRESS F1."
1800 PRINT" TWO MARKS WILL INDICATE WHICH DOTS ARE"
1810 PRINT" ABOVE AND BELOW THE LINE."
1820 PRINT" PRESS SPACE[146]"
1830 GETSP$:IFSP$=""THENGOTO1830
1840 IFSP$<>" "THENGOTO1830
1850 PRINT"[147] TO TEST THE DESIGN ON THE PRINTER,"
1860 PRINT" PRESS 'P'. THE CHARACTER IS DISPLAYED"
1870 PRINT" WITH AND WITHOUT UNDERLINE. PRESS"
1880 PRINT" 'T' TO PRINT ALL CHARACTERS. ALL THE"
1890 PRINT" DATA IS AUTOMATICALLY STORED IN THE"
1900 PRINT" MEMORY. IF YOU DON'T WANT THE DATA
1910 [153]"STORED, OR YOU WANT A NEW GRID, PRESS'N'"
1920 [153]" PRESS SPACEWAIT"
1930 [161]SP$:[139]SP$[178]""[167][137]1930
1940 [139]SP$[179][177]" "[167][137]1930
1950 [153]"LOAD WHEN YOU QUIT ('Q'), YOU CAN SAVE ALL"
1960 [153]" THE DATA TO DISK. THIS FILE CAN"
1970 [153]" BE LOADED BY THIS PROGRAM INTO THE"
1980 [153]" PRINTER ANY TIME YOU WANT THE NEW"
1990 [153]" CHARACTER SET."
2000 [153]" PRESS SPACEWAIT"
2010 [161]SP$:[139]SP$[178]""[167][137]2010
2020 [139]SP$[179][177]" "[167][137]2010
2030 [153]"LOAD YOU MAY NEED TO ALTER PRINTER AND"
2040 [153]" INTERFACE DIP SWITCHES."
2050 [153]" PRINTER:"
2060 [153]" 2-1 ON 2-2 OFF 2-3 OFF 2-4 ON"
2070 [153]" +G INTERFACE:"
2080 [153]" ALL ON"
2090 [153]"OTHER INTERFACES, TRY TRANSPARENT MODE."
2100 [153]" PRESS SPACEWAIT"
2110 [161]SP$:[139]SP$[178]""[167][137]2110
2120 [139]SP$[179][177]" "[167][137]2110
2130 [142]